package org.swift.commons.xml.validation;

public class XMLValidationResult {
	
	private boolean isValid = false;
	private Throwable cause = null;
	
	private String message = "";
	
	public XMLValidationResult (boolean isValid){
		this.isValid = isValid;
	}
	
	public XMLValidationResult (boolean isValid, Throwable cause){
		this(isValid,cause.getMessage());
		this.cause = cause;
	}
	
	public XMLValidationResult (boolean isValid, String message){
		this.isValid = isValid;
		this.message = message;
	}
	
	public XMLValidationResult (boolean isValid, Throwable cause, String message){
		this.isValid = isValid;
		this.message = message;
		this.cause = cause;
	}

	public boolean isValid() {
		return isValid;
	}

	public String getMessage() {
		return message;
	}
	
	public Throwable getCause(){
		return cause;
	}
}
